package com.facemox.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.facemox.bean.Module;
import com.facemox.bean.PermissionAuthentication;
import com.facemox.bean.Project;
import com.facemox.mapper.ModuleMapper;
import com.facemox.service.ModuleService;

@Service
public class ModuleServiceImpl implements ModuleService {

    @Autowired
    private ModuleMapper moduleMapper;
   
    @Override
    public int addProject(Project project) {
        int effectLine = moduleMapper.insertProject(project);
        return effectLine;
    }
    
    @Override
    public int addModule(Module module) {
        int effectLine = moduleMapper.insertModule(module);
        return effectLine;
    }

    @Override
    public List<Project> getAllProject() {
        List<Project> projectList = moduleMapper.getAllProject();
        return projectList;
    }

    @Override
    public List<Module> getAllModule() {
        List<Module> moduleList = moduleMapper.getAllModule();
        return moduleList;
    }

    @Override
    public List<PermissionAuthentication> getAllAuthorization() {
        List<PermissionAuthentication> authenticationList = moduleMapper.getAllAuthorization();
        return authenticationList;
    }

}
